package com.bit.demo1.java;

public class cat {
    private String name;
    private int age;
    private String sex;
    //猫的构造函数
    public cat(String name, int age, String sex) {
        this.name = name;
        this.age = age;
        this.sex = sex;
        System.out.println("调用了包demo2中的dog类中带三个参数的构造函数");
    }

    @Override
    public String toString() {
        return "cat{" +
                "猫的name='" + name + '\'' +
                ", 猫的age=" + age +
                ", 猫的sex='" + sex + '\'' +
                '}';
    }
}
